package com.xian.yoga.entity;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * contract
 * @author 
 */
public class Contract implements Serializable {
    private Integer contractId;

    private Integer studioId;

    private Integer coachId;

    private String studioName;

    private String coachName;

    private BigDecimal contractSalary;

    private Integer contractTerm;

    private static final long serialVersionUID = 1L;

    public Integer getContractId() {
        return contractId;
    }

    public void setContractId(Integer contractId) {
        this.contractId = contractId;
    }

    public Integer getStudioId() {
        return studioId;
    }

    public void setStudioId(Integer studioId) {
        this.studioId = studioId;
    }

    public Integer getCoachId() {
        return coachId;
    }

    public void setCoachId(Integer coachId) {
        this.coachId = coachId;
    }

    public String getStudioName() {
        return studioName;
    }

    public void setStudioName(String studioName) {
        this.studioName = studioName;
    }

    public String getCoachName() {
        return coachName;
    }

    public void setCoachName(String coachName) {
        this.coachName = coachName;
    }

    public BigDecimal getContractSalary() {
        return contractSalary;
    }

    public void setContractSalary(BigDecimal contractSalary) {
        this.contractSalary = contractSalary;
    }

    public Integer getContractTerm() {
        return contractTerm;
    }

    public void setContractTerm(Integer contractTerm) {
        this.contractTerm = contractTerm;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Contract other = (Contract) that;
        return (this.getContractId() == null ? other.getContractId() == null : this.getContractId().equals(other.getContractId()))
            && (this.getStudioId() == null ? other.getStudioId() == null : this.getStudioId().equals(other.getStudioId()))
            && (this.getCoachId() == null ? other.getCoachId() == null : this.getCoachId().equals(other.getCoachId()))
            && (this.getStudioName() == null ? other.getStudioName() == null : this.getStudioName().equals(other.getStudioName()))
            && (this.getCoachName() == null ? other.getCoachName() == null : this.getCoachName().equals(other.getCoachName()))
            && (this.getContractSalary() == null ? other.getContractSalary() == null : this.getContractSalary().equals(other.getContractSalary()))
            && (this.getContractTerm() == null ? other.getContractTerm() == null : this.getContractTerm().equals(other.getContractTerm()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getContractId() == null) ? 0 : getContractId().hashCode());
        result = prime * result + ((getStudioId() == null) ? 0 : getStudioId().hashCode());
        result = prime * result + ((getCoachId() == null) ? 0 : getCoachId().hashCode());
        result = prime * result + ((getStudioName() == null) ? 0 : getStudioName().hashCode());
        result = prime * result + ((getCoachName() == null) ? 0 : getCoachName().hashCode());
        result = prime * result + ((getContractSalary() == null) ? 0 : getContractSalary().hashCode());
        result = prime * result + ((getContractTerm() == null) ? 0 : getContractTerm().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", contractId=").append(contractId);
        sb.append(", studioId=").append(studioId);
        sb.append(", coachId=").append(coachId);
        sb.append(", studioName=").append(studioName);
        sb.append(", coachName=").append(coachName);
        sb.append(", contractSalary=").append(contractSalary);
        sb.append(", contractTerm=").append(contractTerm);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}